package top.ooyyh.bytheway.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface PowerMapper {
    List<String> getRouterPower(String router);

    List<String> getRolePower(String role);
    @MapKey("power")
    List<Map<String, String>> getAllRolePower();
    void grantUserPowerByRole(@Param("user_id")String user_id,@Param("role") String role);

    void grantUserPower(@Param("user_id") String user_id, @Param("power_id") String power_id);
}
